/**
 * Created by Feil.Wang(wangfeilong@xuexibao.cn) on 2015/10/27.
 */
define(['dialog'], function (dialog) {
    return {
        dialog: dialog,
        tips: function (content, fn, time) {
            var duration = time || 1000;
            var d = dialog({
                content: content
            }).show();
            setTimeout(function () {
                d.close().remove();
                if (typeof fn === "function") fn();
            }, duration);
        }
    }
});